package com.gym.code.config.admin.client.model;

import com.gym.code.generator.utils.LocalStringUtils;

/**
 * 
 * @author xinchun.wang
 * @email: 532002108@qq.com
 * @createTime 2015-4-11 上午11:56:53
 */
public class DBColumnModel {

	/**
	 * 字段名
	 * */
	private String columnName;

	/** 类型 */
	private Class<?> clz;

	/** 是否物理主键 */
	private boolean primaryKey;

	/** 是否自增 */
	private boolean autoIncrement;

	/** 默认值 */
	private String defaultValue;
	
	private boolean nullAble;

	public String getColumnName() {
		return columnName;
	}
	
	
	public String getWrappedColumnName() {
		return LocalStringUtils.toBeanName(columnName, false);
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public Class<?> getClz() {
		return clz;
	}
	
	public String getClzStr() {
		return clz.getSimpleName();
	}

	public void setClz(Class<?> clz) {
		this.clz = clz;
	}

	public boolean isPrimaryKey() {
		return primaryKey;
	}

	public void setPrimaryKey(boolean primaryKey) {
		this.primaryKey = primaryKey;
	}

	public boolean isAutoIncrement() {
		return autoIncrement;
	}

	public void setAutoIncrement(boolean autoIncrement) {
		this.autoIncrement = autoIncrement;
	}

	public String getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}

	public boolean isNullAble() {
		return nullAble;
	}

	public void setNullAble(boolean nullAble) {
		this.nullAble = nullAble;
	}

	@Override
	public String toString() {
		return "DBColumnModel [columnName=" + columnName + ", clz=" + clz
				+ ", primaryKey=" + primaryKey + ", autoIncrement="
				+ autoIncrement + ", defaultValue=" + defaultValue
				+ ", nullAble=" + nullAble + "]";
	}
	
	
	

}
